import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View, Dimensions } from "react-native";
import { createConnect } from "./utils/tcpClient";
// import { createServer } from "./utils/tcpServer";
import { useEffect } from "react";

const { width, height } = Dimensions.get("window");

export default function App() {
  // effect
  useEffect(() => {
    createConnect();
    // createServer();
  }, []);

  return (
    <View style={styles.container}>
      <Text>{width}</Text>
      <Text>{height}</Text>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});
